//
//  BookCommentCell.m
//  ZYTS-iPhone
//
//  Created by yuzhou on 12-12-10.
//  Copyright (c) 2012年 wzyk. All rights reserved.
//

#import "ListenCommentCell.h"

@implementation ListenCommentCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)updateDisplay
{
    nameLabel.text = [self.commentInfo valueForKey:@"user_name"];
    timeLabel.text = [self.commentInfo valueForKey:@"create_time"];
    NSString *comment = [self.commentInfo valueForKey:@"content"];
    CGSize size = [comment sizeWithFont:[UIFont systemFontOfSize:16] constrainedToSize:CGSizeMake(300, 99999) lineBreakMode:NSLineBreakByWordWrapping];
    CGRect rect = commentLabel.frame;
    rect.size = size;
    commentLabel.frame = rect;
    commentLabel.text = comment;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)dealloc {
    [nameLabel release];
    [timeLabel release];
    [commentLabel release];
    [_commentInfo release],_commentInfo = nil;
    [super dealloc];
}
@end
